1. Field of the Invention
The present invention relates to a method, system, and computer program product for caching web content, in particular to generate caching information for dynamic portal pages and the caching thereof in an existing caching proxy infrastructure.
2. Related Art
Caching of web content has been used for a long time. The basic standards that allow caching of web pages are defined in the underlying HTTP protocol. These protocols mainly address caching needs for static pages. If dynamic pages are assumed at all, they are always considered as inseparably complete pages individually requested by one URL.
Portal server applications (hereinafter called portals) have introduced a new dimension of flexibility of web page content. Portal pages (see, e.g., FIG. 1) include multiple parts that have different states and different caching requirements for their respective content. Portlets are applications that are running within the portal. The UI of these applications includes sub-sections of the portal pages rendered by the portal. These portlets generate their markup fragments dynamically on request based on their internal state. The look and feel of the portal is generated by layout applications (e.g., Theme/Skin). Layout applications are dynamic applications that may control the look and feel depending on their state. Up to today completely rendered portal pages are not cached. Only a very small subset of generated pages which are known to not change their content over time can be cached.
Portal pages are highly dynamic. Their page content is generated by a hierarchy of multiple dynamic application components and states, such as the combination of portlets on the page which may change over time, the state of portlets on the page, the content of these portlets that may change over time, and most likely navigation elements that depend on current configuration and current state.
Portlets are stateful applications that render their markup on each request. Not only is the markup itself dynamic, but also the lifetime of the rendered markup is calculated dynamically at execution time of the portlet. The expected lifetime for a markup fragment can depend on the current state of the portlet. This highly dynamic characteristic of portal pages makes them non-cacheable.
As mitigation, some portal products today support caching of individual page fragments depending on the expiry time of each individual fragment. On incoming requests, these fragments are aggregated to build the complete portal page. This task is carried out by the portal itself, so each request to a portal page needs to travel the whole way through the network to the origin server.
There is no technique available today that allows caching of highly dynamic portal pages utilizing caching mechanisms.